﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WinFormsMvp.Forms;
using EngineLayer;
using PresentationLayer.Views.ViewContracts;
using WinFormsMvp;
using PresentationLayer.Presenters;

namespace PresentationLayer.Views
{
    [PresenterBinding(typeof(CashierPresenter))]
    public class CashierForm : MvpForm<CashierModel>, ICashierView
    {
        #region Private Variables
        private IEnumerable<object> _DataSource = null;
        private Panel panelAll;
        private Panel panelCenter;
        private Panel panelTotals;
        private Panel panelCenterTop;
        private Panel panelLogo;
        private Panel panelInfo;
        private Panel panelFinder;
        private Panel panelMenuBottom;
        private Panel panelMenuTop;
        private Panel panelFolio;
        private Label lblCurrentFolio;
        private Label lblTitleFolio;
        private TextBox txtProductPrecio;
        private TextBox txtProductDescription;
        private TextBox txtProduct;
        private Label label3;
        private Label label2;
        private Label label1;
        private Microsoft.VisualBasic.PowerPacks.ShapeContainer shapeContainer1;
        private Microsoft.VisualBasic.PowerPacks.LineShape lineShape1;
        private DataGridView GridDetail;
        private DataGridViewTextBoxColumn Description;
        private DataGridViewTextBoxColumn UnitPrice;
        private DataGridViewTextBoxColumn Cuantity;
        private DataGridViewTextBoxColumn Importe;
        private Panel panel2;
        private Label label4;
        private Label lblExchangeRate;
        private Panel panel1;
        private Label lblDate;
        private TableLayoutPanel tableLayoutPanel2;
        private Panel panel3;
        private Label lblDiscount;
        private TextBox txtDiscount;
        private Panel panel6;
        private TextBox txtDollar;
        private TextBox txtTotal;
        private Label lblDollar;
        private Label lblTotal;
        private Label label5;
        private Label label6;
        private TextBox txtCustomerName;
#endregion

        private void InitializeComponent()
        {
            try
            {
                DataGridViewCellStyle dataGridViewCellStyle10 = new DataGridViewCellStyle();
                DataGridViewCellStyle dataGridViewCellStyle11 = new DataGridViewCellStyle();
                DataGridViewCellStyle dataGridViewCellStyle16 = new DataGridViewCellStyle();
                DataGridViewCellStyle dataGridViewCellStyle17 = new DataGridViewCellStyle();
                DataGridViewCellStyle dataGridViewCellStyle18 = new DataGridViewCellStyle();
                DataGridViewCellStyle dataGridViewCellStyle12 = new DataGridViewCellStyle();
                DataGridViewCellStyle dataGridViewCellStyle13 = new DataGridViewCellStyle();
                DataGridViewCellStyle dataGridViewCellStyle14 = new DataGridViewCellStyle();
                DataGridViewCellStyle dataGridViewCellStyle15 = new DataGridViewCellStyle();
                this.panelAll = new Panel();
                this.panelCenter = new Panel();
                this.GridDetail = new DataGridView();
                this.Description = new DataGridViewTextBoxColumn();
                this.UnitPrice = new DataGridViewTextBoxColumn();
                this.Cuantity = new DataGridViewTextBoxColumn();
                this.Importe = new DataGridViewTextBoxColumn();
                this.panelTotals = new Panel();
                this.tableLayoutPanel2 = new TableLayoutPanel();
                this.panel3 = new Panel();
                this.lblDiscount = new Label();
                this.txtDiscount = new TextBox();
                this.panel6 = new Panel();
                this.txtDollar = new TextBox();
                this.txtTotal = new TextBox();
                this.lblDollar = new Label();
                this.lblTotal = new Label();
                this.label5 = new Label();
                this.label6 = new Label();
                this.txtCustomerName = new TextBox();
                this.panelCenterTop = new Panel();
                this.panelLogo = new Panel();
                this.panelInfo = new Panel();
                this.panel2 = new Panel();
                this.label4 = new Label();
                this.lblExchangeRate = new Label();
                this.panel1 = new Panel();
                this.lblDate = new Label();
                this.panelFinder = new Panel();
                this.label3 = new Label();
                this.label2 = new Label();
                this.label1 = new Label();
                this.panelFolio = new Panel();
                this.lblCurrentFolio = new Label();
                this.lblTitleFolio = new Label();
                this.txtProductPrecio = new TextBox();
                this.txtProductDescription = new TextBox();
                this.txtProduct = new TextBox();
                this.shapeContainer1 = new Microsoft.VisualBasic.PowerPacks.ShapeContainer();
                this.lineShape1 = new Microsoft.VisualBasic.PowerPacks.LineShape();
                this.panelMenuBottom = new Panel();
                this.panelMenuTop = new Panel();
                this.panelAll.SuspendLayout();
                this.panelCenter.SuspendLayout();
                ((System.ComponentModel.ISupportInitialize)(this.GridDetail)).BeginInit();
                this.panelTotals.SuspendLayout();
                this.tableLayoutPanel2.SuspendLayout();
                this.panel3.SuspendLayout();
                this.panel6.SuspendLayout();
                this.panelCenterTop.SuspendLayout();
                this.panelInfo.SuspendLayout();
                this.panel2.SuspendLayout();
                this.panel1.SuspendLayout();
                this.panelFinder.SuspendLayout();
                this.panelFolio.SuspendLayout();
                this.SuspendLayout();
                // 
                // panelAll
                // 
                this.panelAll.Controls.Add(this.panelCenter);
                this.panelAll.Controls.Add(this.panelMenuBottom);
                this.panelAll.Controls.Add(this.panelMenuTop);
                this.panelAll.Dock = DockStyle.Fill;
                this.panelAll.Location = new System.Drawing.Point(0, 0);
                this.panelAll.Name = "panelAll";
                this.panelAll.Size = new System.Drawing.Size(945, 630);
                this.panelAll.TabIndex = 0;
                // 
                // panelCenter
                // 
                this.panelCenter.Controls.Add(this.GridDetail);
                this.panelCenter.Controls.Add(this.panelTotals);
                this.panelCenter.Controls.Add(this.panelCenterTop);
                this.panelCenter.Dock = DockStyle.Fill;
                this.panelCenter.Location = new System.Drawing.Point(0, 45);
                this.panelCenter.Name = "panelCenter";
                this.panelCenter.Size = new System.Drawing.Size(945, 535);
                this.panelCenter.TabIndex = 5;
                // 
                // GridDetail
                // 
                this.GridDetail.AllowUserToAddRows = false;
                this.GridDetail.AllowUserToDeleteRows = false;
                this.GridDetail.AllowUserToOrderColumns = true;
                dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.GridDetail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10;
                dataGridViewCellStyle11.Alignment = DataGridViewContentAlignment.MiddleCenter;
                dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
                dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
                dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
                dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
                dataGridViewCellStyle11.WrapMode = DataGridViewTriState.True;
                this.GridDetail.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
                this.GridDetail.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
                this.GridDetail.Columns.AddRange(new DataGridViewColumn[] {
            this.Description,
            this.UnitPrice,
            this.Cuantity,
            this.Importe});
                dataGridViewCellStyle16.Alignment = DataGridViewContentAlignment.MiddleCenter;
                dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window;
                dataGridViewCellStyle16.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText;
                dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
                dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.ControlText;
                dataGridViewCellStyle16.WrapMode = DataGridViewTriState.False;
                this.GridDetail.DefaultCellStyle = dataGridViewCellStyle16;
                this.GridDetail.Dock = DockStyle.Fill;
                this.GridDetail.Location = new System.Drawing.Point(0, 116);
                this.GridDetail.Name = "GridDetail";
                this.GridDetail.ReadOnly = true;
                dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control;
                dataGridViewCellStyle17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText;
                dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.HighlightText;
                dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
                dataGridViewCellStyle17.WrapMode = DataGridViewTriState.True;
                this.GridDetail.RowHeadersDefaultCellStyle = dataGridViewCellStyle17;
                this.GridDetail.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
                dataGridViewCellStyle18.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                dataGridViewCellStyle18.WrapMode = DataGridViewTriState.True;
                this.GridDetail.RowsDefaultCellStyle = dataGridViewCellStyle18;
                this.GridDetail.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
                this.GridDetail.ShowEditingIcon = false;
                this.GridDetail.Size = new System.Drawing.Size(945, 313);
                this.GridDetail.TabIndex = 9;
                this.GridDetail.TabStop = false;
                // 
                // Description
                // 
                this.Description.DataPropertyName = "Description";
                dataGridViewCellStyle12.Alignment = DataGridViewContentAlignment.MiddleLeft;
                dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.Description.DefaultCellStyle = dataGridViewCellStyle12;
                this.Description.HeaderText = "Descripción";
                this.Description.Name = "Description";
                this.Description.ReadOnly = true;
                this.Description.Width = 510;
                // 
                // UnitPrice
                // 
                this.UnitPrice.DataPropertyName = "UnitPrice";
                dataGridViewCellStyle13.Alignment = DataGridViewContentAlignment.MiddleRight;
                dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                dataGridViewCellStyle13.Format = "C2";
                dataGridViewCellStyle13.NullValue = null;
                this.UnitPrice.DefaultCellStyle = dataGridViewCellStyle13;
                this.UnitPrice.HeaderText = "Imp Unitario";
                this.UnitPrice.Name = "UnitPrice";
                this.UnitPrice.ReadOnly = true;
                this.UnitPrice.Width = 180;
                // 
                // Cuantity
                // 
                this.Cuantity.DataPropertyName = "Cuantity";
                dataGridViewCellStyle14.Alignment = DataGridViewContentAlignment.MiddleRight;
                dataGridViewCellStyle14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                dataGridViewCellStyle14.Format = "N0";
                dataGridViewCellStyle14.NullValue = null;
                this.Cuantity.DefaultCellStyle = dataGridViewCellStyle14;
                this.Cuantity.HeaderText = "Cantidad";
                this.Cuantity.Name = "Cuantity";
                this.Cuantity.ReadOnly = true;
                this.Cuantity.Width = 180;
                // 
                // Importe
                // 
                this.Importe.DataPropertyName = "Importe";
                dataGridViewCellStyle15.Alignment = DataGridViewContentAlignment.MiddleRight;
                dataGridViewCellStyle15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                dataGridViewCellStyle15.Format = "C2";
                dataGridViewCellStyle15.NullValue = null;
                this.Importe.DefaultCellStyle = dataGridViewCellStyle15;
                this.Importe.HeaderText = "Importe";
                this.Importe.Name = "Importe";
                this.Importe.ReadOnly = true;
                this.Importe.Width = 180;
                // 
                // panelTotals
                // 
                this.panelTotals.Controls.Add(this.tableLayoutPanel2);
                this.panelTotals.Dock = DockStyle.Bottom;
                this.panelTotals.Location = new System.Drawing.Point(0, 429);
                this.panelTotals.Name = "panelTotals";
                this.panelTotals.Size = new System.Drawing.Size(945, 106);
                this.panelTotals.TabIndex = 8;
                // 
                // tableLayoutPanel2
                // 
                this.tableLayoutPanel2.ColumnCount = 3;
                this.tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 312F));
                this.tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
                this.tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 341F));
                this.tableLayoutPanel2.Controls.Add(this.panel3, 2, 0);
                this.tableLayoutPanel2.Controls.Add(this.panel6, 2, 1);
                this.tableLayoutPanel2.Controls.Add(this.label5, 1, 0);
                this.tableLayoutPanel2.Controls.Add(this.label6, 0, 0);
                this.tableLayoutPanel2.Controls.Add(this.txtCustomerName, 1, 1);
                this.tableLayoutPanel2.Dock = DockStyle.Fill;
                this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
                this.tableLayoutPanel2.Name = "tableLayoutPanel2";
                this.tableLayoutPanel2.RowCount = 2;
                this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 33.96227F));
                this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 66.03773F));
                this.tableLayoutPanel2.Size = new System.Drawing.Size(945, 106);
                this.tableLayoutPanel2.TabIndex = 3;
                // 
                // panel3
                // 
                this.panel3.Controls.Add(this.lblDiscount);
                this.panel3.Controls.Add(this.txtDiscount);
                this.panel3.Dock = DockStyle.Fill;
                this.panel3.Enabled = false;
                this.panel3.Location = new System.Drawing.Point(607, 3);
                this.panel3.Name = "panel3";
                this.panel3.Size = new System.Drawing.Size(335, 30);
                this.panel3.TabIndex = 4;
                // 
                // lblDiscount
                // 
                this.lblDiscount.AutoSize = true;
                this.lblDiscount.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.lblDiscount.ForeColor = System.Drawing.Color.DarkBlue;
                this.lblDiscount.Location = new System.Drawing.Point(9, 6);
                this.lblDiscount.Name = "lblDiscount";
                this.lblDiscount.Size = new System.Drawing.Size(156, 20);
                this.lblDiscount.TabIndex = 0;
                this.lblDiscount.Text = "Descuento: 100 %";
                this.lblDiscount.TextAlign = System.Drawing.ContentAlignment.TopRight;
                // 
                // txtDiscount
                // 
                this.txtDiscount.BackColor = System.Drawing.SystemColors.Control;
                this.txtDiscount.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.txtDiscount.ForeColor = System.Drawing.Color.DarkBlue;
                this.txtDiscount.Location = new System.Drawing.Point(171, 3);
                this.txtDiscount.Name = "txtDiscount";
                this.txtDiscount.Size = new System.Drawing.Size(149, 26);
                this.txtDiscount.TabIndex = 1;
                this.txtDiscount.TabStop = false;
                this.txtDiscount.TextAlign = HorizontalAlignment.Right;
                // 
                // panel6
                // 
                this.panel6.Controls.Add(this.txtDollar);
                this.panel6.Controls.Add(this.txtTotal);
                this.panel6.Controls.Add(this.lblDollar);
                this.panel6.Controls.Add(this.lblTotal);
                this.panel6.Dock = DockStyle.Fill;
                this.panel6.Location = new System.Drawing.Point(607, 39);
                this.panel6.Name = "panel6";
                this.panel6.Size = new System.Drawing.Size(335, 64);
                this.panel6.TabIndex = 5;
                // 
                // txtDollar
                // 
                this.txtDollar.BackColor = System.Drawing.SystemColors.Control;
                this.txtDollar.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.txtDollar.ForeColor = System.Drawing.Color.Green;
                this.txtDollar.Location = new System.Drawing.Point(171, 32);
                this.txtDollar.Name = "txtDollar";
                this.txtDollar.Size = new System.Drawing.Size(149, 26);
                this.txtDollar.TabIndex = 3;
                this.txtDollar.TabStop = false;
                this.txtDollar.TextAlign = HorizontalAlignment.Right;
                // 
                // txtTotal
                // 
                this.txtTotal.BackColor = System.Drawing.SystemColors.Control;
                this.txtTotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.txtTotal.Location = new System.Drawing.Point(171, 1);
                this.txtTotal.Name = "txtTotal";
                this.txtTotal.Size = new System.Drawing.Size(149, 26);
                this.txtTotal.TabIndex = 1;
                this.txtTotal.TabStop = false;
                this.txtTotal.TextAlign = HorizontalAlignment.Right;
                // 
                // lblDollar
                // 
                this.lblDollar.AutoSize = true;
                this.lblDollar.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.lblDollar.ForeColor = System.Drawing.Color.Green;
                this.lblDollar.Location = new System.Drawing.Point(121, 35);
                this.lblDollar.Name = "lblDollar";
                this.lblDollar.Size = new System.Drawing.Size(44, 20);
                this.lblDollar.TabIndex = 2;
                this.lblDollar.Text = "U.S.";
                // 
                // lblTotal
                // 
                this.lblTotal.AutoSize = true;
                this.lblTotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.lblTotal.Location = new System.Drawing.Point(75, 4);
                this.lblTotal.Name = "lblTotal";
                this.lblTotal.Size = new System.Drawing.Size(90, 20);
                this.lblTotal.TabIndex = 0;
                this.lblTotal.Text = "Total M.N.";
                // 
                // label5
                // 
                this.label5.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
                            | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.label5.AutoSize = true;
                this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.label5.Location = new System.Drawing.Point(315, 0);
                this.label5.Name = "label5";
                this.label5.Size = new System.Drawing.Size(286, 36);
                this.label5.TabIndex = 6;
                this.label5.Text = "A Nombre de:";
                this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
                // 
                // label6
                // 
                this.label6.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
                            | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.label6.AutoSize = true;
                this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.label6.Location = new System.Drawing.Point(3, 0);
                this.label6.Name = "label6";
                this.label6.Size = new System.Drawing.Size(306, 36);
                this.label6.TabIndex = 6;
                this.label6.Text = "Tipo de Orden:";
                this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
                // 
                // txtCustomerName
                // 
                this.txtCustomerName.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
                            | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.txtCustomerName.Location = new System.Drawing.Point(315, 39);
                this.txtCustomerName.Name = "txtCustomerName";
                this.txtCustomerName.Size = new System.Drawing.Size(286, 20);
                this.txtCustomerName.TabIndex = 7;
                this.txtCustomerName.TextAlign = HorizontalAlignment.Center;
                // 
                // panelCenterTop
                // 
                this.panelCenterTop.Controls.Add(this.panelLogo);
                this.panelCenterTop.Controls.Add(this.panelInfo);
                this.panelCenterTop.Controls.Add(this.panelFinder);
                this.panelCenterTop.Dock = DockStyle.Top;
                this.panelCenterTop.Location = new System.Drawing.Point(0, 0);
                this.panelCenterTop.Name = "panelCenterTop";
                this.panelCenterTop.Size = new System.Drawing.Size(945, 116);
                this.panelCenterTop.TabIndex = 7;
                // 
                // panelLogo
                // 
                this.panelLogo.BackgroundImage = null;// global::PresentationLayer.Properties.Resources.logo;
                this.panelLogo.BackgroundImageLayout = ImageLayout.Zoom;
                this.panelLogo.Dock = DockStyle.Left;
                this.panelLogo.Location = new System.Drawing.Point(0, 0);
                this.panelLogo.Name = "panelLogo";
                this.panelLogo.Size = new System.Drawing.Size(141, 116);
                this.panelLogo.TabIndex = 10;
                // 
                // panelInfo
                // 
                this.panelInfo.BackColor = System.Drawing.Color.DimGray;
                this.panelInfo.Controls.Add(this.panel2);
                this.panelInfo.Controls.Add(this.panel1);
                this.panelInfo.Dock = DockStyle.Right;
                this.panelInfo.Location = new System.Drawing.Point(718, 0);
                this.panelInfo.Name = "panelInfo";
                this.panelInfo.Size = new System.Drawing.Size(227, 116);
                this.panelInfo.TabIndex = 9;
                // 
                // panel2
                // 
                this.panel2.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
                            | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.panel2.Controls.Add(this.label4);
                this.panel2.Controls.Add(this.lblExchangeRate);
                this.panel2.Location = new System.Drawing.Point(3, 27);
                this.panel2.Name = "panel2";
                this.panel2.Size = new System.Drawing.Size(221, 83);
                this.panel2.TabIndex = 0;
                // 
                // label4
                // 
                this.label4.AutoSize = true;
                this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
                this.label4.Location = new System.Drawing.Point(74, 30);
                this.label4.Name = "label4";
                this.label4.Size = new System.Drawing.Size(101, 37);
                this.label4.TabIndex = 0;
                this.label4.Text = "12.80";
                this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
                // 
                // lblExchangeRate
                // 
                this.lblExchangeRate.AutoSize = true;
                this.lblExchangeRate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.lblExchangeRate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));
                this.lblExchangeRate.Location = new System.Drawing.Point(51, 0);
                this.lblExchangeRate.Name = "lblExchangeRate";
                this.lblExchangeRate.Size = new System.Drawing.Size(133, 20);
                this.lblExchangeRate.TabIndex = 0;
                this.lblExchangeRate.Text = "Tipo de Cambio";
                this.lblExchangeRate.TextAlign = System.Drawing.ContentAlignment.TopCenter;
                // 
                // panel1
                // 
                this.panel1.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
                            | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.panel1.Controls.Add(this.lblDate);
                this.panel1.Location = new System.Drawing.Point(3, 0);
                this.panel1.Name = "panel1";
                this.panel1.Size = new System.Drawing.Size(221, 21);
                this.panel1.TabIndex = 0;
                // 
                // lblDate
                // 
                this.lblDate.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
                            | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.lblDate.AutoSize = true;
                this.lblDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.lblDate.ForeColor = System.Drawing.Color.White;
                this.lblDate.Location = new System.Drawing.Point(46, 3);
                this.lblDate.Name = "lblDate";
                this.lblDate.Size = new System.Drawing.Size(129, 20);
                this.lblDate.TabIndex = 0;
                this.lblDate.Text = "04 / Mar / 2014";
                // 
                // panelFinder
                // 
                this.panelFinder.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
                            | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.panelFinder.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
                this.panelFinder.Controls.Add(this.label3);
                this.panelFinder.Controls.Add(this.label2);
                this.panelFinder.Controls.Add(this.label1);
                this.panelFinder.Controls.Add(this.panelFolio);
                this.panelFinder.Controls.Add(this.txtProductPrecio);
                this.panelFinder.Controls.Add(this.txtProductDescription);
                this.panelFinder.Controls.Add(this.txtProduct);
                this.panelFinder.Controls.Add(this.shapeContainer1);
                this.panelFinder.Location = new System.Drawing.Point(147, 3);
                this.panelFinder.Name = "panelFinder";
                this.panelFinder.Size = new System.Drawing.Size(565, 110);
                this.panelFinder.TabIndex = 8;
                // 
                // label3
                // 
                this.label3.AutoSize = true;
                this.label3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
                this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.label3.Location = new System.Drawing.Point(27, 83);
                this.label3.Name = "label3";
                this.label3.Size = new System.Drawing.Size(64, 20);
                this.label3.TabIndex = 2;
                this.label3.Text = "Precio:";
                // 
                // label2
                // 
                this.label2.AutoSize = true;
                this.label2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
                this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.label2.Location = new System.Drawing.Point(3, 57);
                this.label2.Name = "label2";
                this.label2.Size = new System.Drawing.Size(91, 20);
                this.label2.TabIndex = 2;
                this.label2.Text = " Producto:";
                // 
                // label1
                // 
                this.label1.AutoSize = true;
                this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
                this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.label1.Location = new System.Drawing.Point(21, 18);
                this.label1.Name = "label1";
                this.label1.Size = new System.Drawing.Size(70, 20);
                this.label1.TabIndex = 2;
                this.label1.Text = "Buscar:";
                // 
                // panelFolio
                // 
                this.panelFolio.BackColor = System.Drawing.Color.DimGray;
                this.panelFolio.Controls.Add(this.lblCurrentFolio);
                this.panelFolio.Controls.Add(this.lblTitleFolio);
                this.panelFolio.Dock = DockStyle.Right;
                this.panelFolio.Location = new System.Drawing.Point(473, 0);
                this.panelFolio.Name = "panelFolio";
                this.panelFolio.Size = new System.Drawing.Size(92, 110);
                this.panelFolio.TabIndex = 1;
                // 
                // lblCurrentFolio
                // 
                this.lblCurrentFolio.Anchor = ((AnchorStyles)(((AnchorStyles.Top | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.lblCurrentFolio.AutoSize = true;
                this.lblCurrentFolio.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.lblCurrentFolio.ForeColor = System.Drawing.Color.Yellow;
                this.lblCurrentFolio.Location = new System.Drawing.Point(25, 48);
                this.lblCurrentFolio.Margin = new Padding(2);
                this.lblCurrentFolio.Name = "lblCurrentFolio";
                this.lblCurrentFolio.Size = new System.Drawing.Size(55, 29);
                this.lblCurrentFolio.TabIndex = 2;
                this.lblCurrentFolio.Text = "999";
                this.lblCurrentFolio.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
                // 
                // lblTitleFolio
                // 
                this.lblTitleFolio.Anchor = ((AnchorStyles)(((AnchorStyles.Top | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.lblTitleFolio.AutoSize = true;
                this.lblTitleFolio.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                this.lblTitleFolio.ForeColor = System.Drawing.Color.Yellow;
                this.lblTitleFolio.Location = new System.Drawing.Point(20, 13);
                this.lblTitleFolio.Margin = new Padding(2);
                this.lblTitleFolio.Name = "lblTitleFolio";
                this.lblTitleFolio.Size = new System.Drawing.Size(64, 25);
                this.lblTitleFolio.TabIndex = 1;
                this.lblTitleFolio.Text = "Folio";
                this.lblTitleFolio.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
                // 
                // txtProductPrecio
                // 
                this.txtProductPrecio.Enabled = false;
                this.txtProductPrecio.Location = new System.Drawing.Point(97, 83);
                this.txtProductPrecio.Name = "txtProductPrecio";
                this.txtProductPrecio.Size = new System.Drawing.Size(115, 20);
                this.txtProductPrecio.TabIndex = 2;
                // 
                // txtProductDescription
                // 
                this.txtProductDescription.Enabled = false;
                this.txtProductDescription.Location = new System.Drawing.Point(97, 57);
                this.txtProductDescription.Name = "txtProductDescription";
                this.txtProductDescription.Size = new System.Drawing.Size(304, 20);
                this.txtProductDescription.TabIndex = 1;
                // 
                // txtProduct
                // 
                this.txtProduct.Location = new System.Drawing.Point(97, 20);
                this.txtProduct.Name = "txtProduct";
                this.txtProduct.Size = new System.Drawing.Size(304, 20);
                this.txtProduct.TextChanged += new System.EventHandler(this.TextBoxFindChanged);
                this.txtProduct.TabIndex = 0;
                // 
                // shapeContainer1
                // 
                this.shapeContainer1.Location = new System.Drawing.Point(0, 0);
                this.shapeContainer1.Margin = new Padding(0);
                this.shapeContainer1.Name = "shapeContainer1";
                this.shapeContainer1.Shapes.AddRange(new Microsoft.VisualBasic.PowerPacks.Shape[] {
            this.lineShape1});
                this.shapeContainer1.Size = new System.Drawing.Size(565, 110);
                this.shapeContainer1.TabIndex = 3;
                this.shapeContainer1.TabStop = false;
                // 
                // lineShape1
                // 
                this.lineShape1.Anchor = ((AnchorStyles)(((AnchorStyles.Top | AnchorStyles.Left)
                            | AnchorStyles.Right)));
                this.lineShape1.Name = "lineShape1";
                this.lineShape1.X1 = 0;
                this.lineShape1.X2 = 964;
                this.lineShape1.Y1 = 47;
                this.lineShape1.Y2 = 47;
                // 
                // panelMenuBottom
                // 
                this.panelMenuBottom.BackColor = System.Drawing.Color.Maroon;
                this.panelMenuBottom.Dock = DockStyle.Bottom;
                this.panelMenuBottom.Location = new System.Drawing.Point(0, 580);
                this.panelMenuBottom.Name = "panelMenuBottom";
                this.panelMenuBottom.Size = new System.Drawing.Size(945, 50);
                this.panelMenuBottom.TabIndex = 2;
                // 
                // panelMenuTop
                // 
                this.panelMenuTop.BackColor = System.Drawing.Color.Maroon;
                this.panelMenuTop.Dock = DockStyle.Top;
                this.panelMenuTop.Location = new System.Drawing.Point(0, 0);
                this.panelMenuTop.Name = "panelMenuTop";
                this.panelMenuTop.Size = new System.Drawing.Size(945, 45);
                this.panelMenuTop.TabIndex = 1;
                // 
                // CashierForm
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
                this.AutoScaleMode = AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(945, 630);
                this.Controls.Add(this.panelAll);
                this.Name = "CashierForm";
                this.Text = "CashierForm";
                this.WindowState = FormWindowState.Maximized;
                this.panelAll.ResumeLayout(false);
                this.panelCenter.ResumeLayout(false);
                ((System.ComponentModel.ISupportInitialize)(this.GridDetail)).EndInit();
                this.panelTotals.ResumeLayout(false);
                this.tableLayoutPanel2.ResumeLayout(false);
                this.tableLayoutPanel2.PerformLayout();
                this.panel3.ResumeLayout(false);
                this.panel3.PerformLayout();
                this.panel6.ResumeLayout(false);
                this.panel6.PerformLayout();
                this.panelCenterTop.ResumeLayout(false);
                this.panelInfo.ResumeLayout(false);
                this.panel2.ResumeLayout(false);
                this.panel2.PerformLayout();
                this.panel1.ResumeLayout(false);
                this.panel1.PerformLayout();
                this.panelFinder.ResumeLayout(false);
                this.panelFinder.PerformLayout();
                this.panelFolio.ResumeLayout(false);
                this.panelFolio.PerformLayout();
            }
            catch (Exception ex)
            { }
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.InitializeComponent();

        }

        private void RefreshProductData()
        {
            BindingSource bindingSource = new BindingSource();
            bindingSource.DataSource = _DataSource;
           // GridDetail.DataSource = bindingSource;
            txtProductDescription.Text = "";//_DataSource.Select(n => n.
            txtProductPrecio.Text = "";

        }

        #region Implementation of ICashierView

        public event EventHandler GetCatalogData;
        public event EventHandler TextBoxFindChanged;
        public event EventHandler OnClickButton;
        public event EventHandler CloseFormClicked;

        public event DataGridViewDataErrorEventHandler DataGridViewError;

        public void Binding(IEnumerable<object> DataSource)
        {
            _DataSource = DataSource;
            RefreshProductData();
        }

        public void CloseForm()
        {
            this.Close();
        }

        #endregion
    }
}